package com.mszlu.blog.vo;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;

import java.util.List;

/**
 * @author linKe
 * 文章对应vo对象 页面需要展示的属性
 */
@Data
public class ArticleVo {

    /**
     * 不需要序列化
     *  JsonSerialize(using = ToStringSerializer.class)
     *  防止精度丢失  直接改成string类型的id
     */
    private String id;

    private String title;

    private String summary;

    private Integer commentCounts;

    private Integer viewCounts;

    private Integer weight;
    /**
     * 创建时间
     */
    private String createDate;

    private String author;
    /**
     * 文章内容
     */
    private ArticleBodyVo body;

    private List<TagVo> tags;
    /**
     * 文章分类
     */
    private CategoryVo category;

}
